package org.biubiu0002.baiblog.common.constants;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: YeRuijian
 * @Date: 2022/5/7 7:19 PM
 * @Description:
 * @Version: 1.0
 */
public class Constants {

    public static final int NORMAL = 0;

    public static final int DELETED = 1;

    /**
     * 用户名正则
     */
    public static final String USERNAME_REGEX = "^[0-9a-zA-Z\\u4E00-\\u9FA5@_-]{2,15}$";
    /**
     * 密码正则
     * 密码应为字母，数字，特殊符号(~!@#$%^&*()_.)，两种及以上组合，8-16位字符串，如：xyl37@baa
     */
    public static final String PASSWORD_REGEX = "(?!^(\\d+|[a-zA-Z]+|[~!@#$%^&*()_.]+)$)^[\\w~!@#$%^&*()_.]{8,16}$";
    /**
     * 手机号正则
     */
    public static final String PHONE_REGEX = "^1[0-9]{10}$";
    /**
     * 邮箱正则
     */
    public static final String EMAIL_REGEX = "^([A-Za-z0-9_\\-\\.])+\\@([A-Za-z0-9_\\-\\.])+\\.([A-Za-z]{2,4})$";

    /**
     * 管理员邀请注册码
     */
    public static final String REGISTER_SECRET = "HELLOADMIN";

    /**
     * 1页2条
     */
    public static final Map<String,Object> COMMENT_QUERY_MAP = new HashMap<String,Object>(){{put("page","1");put("limit","2");}};





}
